package com.zcoj.pojo.Dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @author 剩xia的盛夏
 * @date 2023/02/24 16:16
 */
@Data
@ApiModel("")
@Accessors(chain = true)
public class ContestRecord  implements Serializable {

    private static final long serialVersionUID = 2892248514883451461L;
    @ApiModelProperty(value = "主键", example = "1")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "比赛id", example = "1")
    private Integer cid;

    @ApiModelProperty(value = "用户id", example = "1")
    private Integer uid;

    @ApiModelProperty(value = "题目id", example = "1")
    private Integer pid;

    @ApiModelProperty(value = "比赛中的题目的id", example = "1")
    private Integer cpid;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "真实姓名")
    private String realname;

    @ApiModelProperty(value = "提交id，用于可重判", example = "1")
    private Integer submitId;

    @ApiModelProperty(value = "提交结果，0表示未AC通过不罚时，1表示AC通过，-1为未AC通过算罚时", example = "1")
    private Integer status;

    @ApiModelProperty(value = "具体提交时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date submitTime;

    @ApiModelProperty(value = "提交用时，为提交时间减去比赛时间 hh:mm:ss", example = "1")
    private Long time;

    @ApiModelProperty(value = "OI比赛的得分", example = "1")
    private Integer score;

    @ApiModelProperty(value = "运行耗时ms", example = "1")
    private Integer useTime;

    @ApiModelProperty(value = "是否为一血AC 0否1是")
    private Boolean firstBlood;

    @ApiModelProperty(value = "AC是否已校验")
    private Boolean checked;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

}
